package com.tms.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tms.basic.pojo.domain.DriverLicense;
import com.tms.basic.pojo.vo.DriverLicenseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 驾驶证信息Mapper接口
 *
 * @author TMS
 * @since 2024-01-01
 */
@Mapper
public interface DriverLicenseMapper extends BaseMapper<DriverLicense> {

    /**
     * 根据驾驶员ID查询驾驶证列表
     *
     * @param driverId 驾驶员ID
     * @return 驾驶证列表
     */
    List<DriverLicenseVO> selectLicensesByDriverId(@Param("driverId") Long driverId);

    /**
     * 查询即将到期的驾驶证
     *
     * @param days 提前天数
     * @return 即将到期的驾驶证列表
     */
    List<DriverLicenseVO> selectExpiringLicenses(@Param("days") Integer days);
} 